open(BUFF,"fwdStrandResults_BRCA_removeddup_normal.tfam");
open(BUFF1,"sampleqc_BRCA_removeddup_normal");
open(WRBUFF,">../fwdStrandResults_BRCA_removeddup_normal.tfam");
open(WRBUFF1,">../sampleqc_BRCA_removeddup_normal");
$line=<BUFF1>;
print WRBUFF1 $line;
while($line=<BUFF>)
{
	chomp($line);
	@array = split(" ",$line);
	$line1=<BUFF1>;
	chomp($line1);
	@array1  = split("\t",$line1);
	if($array[1] eq $array1[0])
	{
		$array[1] = $array[0];
		$array1[0] = $array[0];
	}
	else
	{
		die "samples not match\n";
	}
	$line = join(" ",@array);
	$line1 = join("\t",@array1);
	print WRBUFF $line."\n";
	print WRBUFF1 $line1."\n";
}
